package com.chapter12.five_exception;

public class ClassCastexception {
    public static void main(String[] args) {
        A a = new B();//向上转型
        B b = (B) a; //向下转型
        C c = (C) a; //ClassCastexception异常


    }
}


class A {}
class B extends A {}
class C extends A {}